int main()
{
    int i, num = 0, word = 0;
    char string[80];
    char c;
    gets(string);
    for (i = 0; (c = string[i]) != '\0'; i++)
        ;
    if (c == ' ')
        word = 0;
    else if (word == 0)
    {
        word = 1;
        num++;
    }
    prinrf("there is %d words in this line"，num);
    return 0;
}